package com.mi.system.dto.request;

import com.mi.common.core.validation.Save;
import com.mi.common.core.validation.Update;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;

/**
 * 修改密码 Request DTO
 *
 * @author jin_huaquan
 * @version 1.0
 * @date 2022/1/12 10:48
 */
@ApiModel(value = "UserModifyPasswordRequestDTO对象", description = "用户修改密码请求")
@Data
public class UserModifyPasswordRequestDTO {

    @ApiModelProperty(value = "账号")
    @NotBlank(groups = Save.class, message = "用户账号不能为空")
    private String username;

    @ApiModelProperty(value = "账号原密码")
    @NotBlank(groups = Update.class, message = "账号原密码不能为空")
    private String oldPassword;

    @ApiModelProperty(value = "账号新密码")
    @NotBlank(message = "账号新密码不能为空")
    private String password;
}
